package com.jxau.service;

import com.jxau.entity.Comment;

import com.github.pagehelper.PageInfo;
import com.jxau.entity.Temp;
import org.springframework.stereotype.Service;

import java.util.List;

import java.util.ArrayList;
public interface CommentService {
    /**
     * 文章下评论（无回复者）
     * @param comment
     */
    Comment addCommentUnderArticle(Comment comment);
    /**
     * 已有评论下回复
     * @param comment
     */
    Comment addCommentReply(Comment comment);
    /**
     * 查找我的评论
     * @param uid
     * @return
     */
    ArrayList<Comment> queryMyComment(String uid,int nowPage);

    ArrayList<Comment> queryCommentOfUser(String uid, int nowPage);
    /**
     * 查找文章下评论，带点赞状态
     * @param articleId
     * @param uid
     * @param nowPage
     * @return
     */
    ArrayList<Comment> queryCommentOfArticle(int articleId, String uid, int nowPage);

//-----------------------------------------------------------------------

    List<Temp> getPages(int pageNum, int pageSize);

    PageInfo<Temp> getPagesData();

    List<Temp> findCommentByName(String name);

    int deleteCommentById(int id);

    void cleanRedPointOfComment(String uid);
}
